package aa.zc;

import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;

@Controller
public class Appcontroller {
	@RequestMapping("test")
	@ResponseBody
	public String test() {
		return "test";
	}
	@RequestMapping("test1")
	public String test1() {
		RestTemplate restTemplate = new RestTemplate();
		String result = restTemplate.getForObject("http://127.0.0.1:8080/home", String.class);
		return result;
	}
}
